# Python 2.6.4
# Project Euler, Problem 116
# Copyright 2010 Talha Zaman

def fac(n):
    prod = 1
    for i in xrange(2, n+1):
        prod *= i
    return prod

length, ways = 50, 0
for color in [2, 3, 4]: 
    for tiles in range(1, 1+length/color):
        black = length - (tiles*color)
        ways += fac(tiles+black) / (fac(tiles)*fac(black))
print ways
